package com.youkeda.app.dataobject;

import java.io.Serializable;
import java.util.Date;

import com.youkeda.app.model.PersonalRecord;
import lombok.Data;
import org.springframework.beans.BeanUtils;

/**
 * personal_record
 * @author 
 */
@Data
public class PersonalRecordDO implements Serializable {
    /**
     * 主键
     */
    private Long id;

    private Long userId;

    /**
     * 积分
     */
    private Integer points;

    /**
     * 场数
     */
    private Integer playNum;

    /**
     * 获胜数
     */
    private Integer winTimes;

    /**
     * 前十数
     */
    private Integer topTenTimes;

    /**
     * 淘汰/被淘汰
     */
    private Double kd;

    /**
     * 淘汰数
     */
    private Integer eliminateNum;

    /**
     * 创建时间
     */
    private Date gmtCreated;

    /**
     * 更新时间
     */
    private Date gmtModified;

    private static final long serialVersionUID = 1L;

    public PersonalRecordDO() {
    }

    public PersonalRecordDO(PersonalRecord personalRecord){
        BeanUtils.copyProperties(personalRecord,this);
    }

    public PersonalRecord convertToModel() {
        PersonalRecord personalRecord = new PersonalRecord();
        BeanUtils.copyProperties(this, personalRecord);
        return personalRecord;
    }

}